package com.cloud.order.mapper.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 定时任务表(Job) 实体类
*
* @author zhangxun
* @since 2020-08-24
*/
@Data
@TableName(value = "job")
public class Job implements Serializable {
    private static final long serialVersionUID=1L;
    /*** 任务id*/
    @TableId(type = IdType.AUTO)
    private Long jobId;

    /*** spring bean名称*/
    @TableField("bean_name")
    private String beanName;

    /*** 方法名*/
    @TableField("method_name")
    private String methodName;

    /*** 参数*/
    @TableField("params")
    private String params;

    /*** cron表达式*/
    @TableField("corn_expression")
    private String cornExpression;

    /*** 任务状态  0：正常  1：暂停*/
    @TableField("status")
    private String status;

    /*** 备注*/
    @TableField("remark")
    private String remark;

    /*** 创建时间*/
    @TableField("create_time")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}